↳ Prolog
↳ PrologToPiTRSProof
balance_in_ga(T, TB) → U1_ga(T, TB, balance_in_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, [])))
balance_in_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T)) → balance_out_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T))
balance_in_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))) → balance_out_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT))
U1_ga(T, TB, balance_out_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, []))) → balance_out_ga(T, TB)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
balance_in_ga(T, TB) → U1_ga(T, TB, balance_in_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, [])))
balance_in_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T)) → balance_out_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T))
balance_in_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))) → balance_out_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT))
U1_ga(T, TB, balance_out_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, []))) → balance_out_ga(T, TB)
BALANCE_IN_GA(T, TB) → U1_GA(T, TB, balance_in_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, [])))
BALANCE_IN_GA(T, TB) → BALANCE_IN_GGGGG(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, []))
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → BALANCE_IN_GGGGG(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))
U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → BALANCE_IN_GGGGG(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))
balance_in_ga(T, TB) → U1_ga(T, TB, balance_in_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, [])))
balance_in_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T)) → balance_out_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T))
balance_in_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))) → balance_out_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT))
U1_ga(T, TB, balance_out_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, []))) → balance_out_ga(T, TB)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
BALANCE_IN_GA(T, TB) → U1_GA(T, TB, balance_in_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, [])))
BALANCE_IN_GA(T, TB) → BALANCE_IN_GGGGG(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, []))
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → BALANCE_IN_GGGGG(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))
U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → BALANCE_IN_GGGGG(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))
balance_in_ga(T, TB) → U1_ga(T, TB, balance_in_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, [])))
balance_in_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T)) → balance_out_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T))
balance_in_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))) → balance_out_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT))
U1_ga(T, TB, balance_out_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, []))) → balance_out_ga(T, TB)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → BALANCE_IN_GGGGG(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))
U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → BALANCE_IN_GGGGG(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
balance_in_ga(T, TB) → U1_ga(T, TB, balance_in_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, [])))
balance_in_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T)) → balance_out_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T))
balance_in_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))) → balance_out_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT))
U1_ga(T, TB, balance_out_ggggg(T, -(I, []), -(.(','(TB, -(I, [])), X), X), -(Rest, []), -(Rest, []))) → balance_out_ga(T, TB)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → BALANCE_IN_GGGGG(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))
U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → BALANCE_IN_GGGGG(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))
BALANCE_IN_GGGGG(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_GGGGG(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
balance_in_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T)) → balance_out_ggggg(nil, -(X, X), -(A, B), -(A, B), -(.(','(nil, -(C, C)), T), T))
balance_in_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT)) → U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1)))
U2_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(L, -(IH, .(V, IT1)), -(H, T), -(HR1, TR1), -(NH, NT1))) → U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_in_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT)))
U3_ggggg(L, V, R, IH, IT, LB, VB, RB, A, D, H, X, T, HR, TR, NH, NT, balance_out_ggggg(R, -(IT1, IT), -(HR1, TR1), -(HR, TR), -(NT1, NT))) → balance_out_ggggg(tree(L, V, R), -(IH, IT), -(.(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T))), -(HR, TR), -(NH, NT))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
BALANCE_IN_GGGGG(tree(L, V, R), -, -, -, -) → BALANCE_IN_GGGGG(L, -, -, -, -)
BALANCE_IN_GGGGG(tree(L, V, R), -, -, -, -) → U2_GGGGG(R, balance_in_ggggg(L, -, -, -, -))
U2_GGGGG(R, balance_out_ggggg) → BALANCE_IN_GGGGG(R, -, -, -, -)
balance_in_ggggg(nil, -, -, -, -) → balance_out_ggggg
balance_in_ggggg(tree(L, V, R), -, -, -, -) → U2_ggggg(R, balance_in_ggggg(L, -, -, -, -))
U2_ggggg(R, balance_out_ggggg) → U3_ggggg(balance_in_ggggg(R, -, -, -, -))
U3_ggggg(balance_out_ggggg) → balance_out_ggggg
balance_in_ggggg(x0, x1, x2, x3, x4)
U2_ggggg(x0, x1)
U3_ggggg(x0)
From the DPs we obtained the following set of size-change graphs: